In an OpenFlow technology, programming a network is allowed as if the network were a computer. In OpenFlow and software-defined networking (SDN), an abstraction layer of a physical network may be directly provided for a control component, and setting and operating a network by using software is allowed. A core idea of the OpenFlow technology is to convert a packet forwarding process, which is originally under full control of a switch/router, into an independent process that is completed by an OpenFlow switch and a controller separately.
The OpenFlow switch includes three parts: a flow table, a secure channel, and an OpenFlow protocol. The flow table includes a match field (Match Field), a counter (Counter), and an instruction set (Instructions), and is used to store a forwarding rule for a packet. The secure channel is an interface for connecting the OpenFlow switch to the controller. The OpenFlow protocol is a standard for describing information used for interaction between the controller and the switch. In an OpenFlow network, the OpenFlow switch executes a command from the OpenFlow controller, and forwards a received packet according to a flow rule delivered by the controller. When unable to find a forwarding rule corresponding to a received packet, the OpenFlow switch forwards the packet to the controller, and the controller decides a forwarding action of the packet, and delivers a new forwarding rule to the OpenFlow switch.
Packet matching performed by the existing OpenFlow switch can be based only on limited fields. That is, the match field of the flow table in the switch cannot be updated dynamically. For example, it is assumed that the match field of the flow table has only three fields available for matching packets, where the three fields are field A, field B, and field C that are specified in the protocol. In a packet, when a characteristic field used to represent a data flow corresponding to the packet is field D, instead of any one of the field A, the field B, and the field C, if the OpenFlow switch performs packet matching, the match field of the flow table needs to be extended to the field A, the field B, the field C, and the field D. The extending generally needs to bear a cost, for example, changing hardware logic or upgrading current software and/or hardware.
It can be seen that the existing match field of the Switch cannot be updated dynamically, the update of the match field can be supported only when the current software/hardware is upgraded, and service requirements cannot be met.